\pard\tx1140\tx2300\tx3440\tx4600\tx5760\tx6900\tx8060\tx9200\tx10360\tx11520\f2\b0\i0\ul0\fs28 Text object Runs\
\
Q: How do I get at the list of runs in a Text object, without subclassing the Text class? Once I have them, how do I determine how many of them there are?\
\b For 1.0
\b0 \
A: You can cheat and do\
\
id someText;\
int nRuns;\
struct TextStruct \{@defs(Text);\};\
\
printf ("runs are %x\\n", ((struct TextStruct *)someText)->theRuns);\
nRuns = theRuns->chunk.used / sizeof(NXRun);\
\
If you're going to use it often enough, you can create a typedef. Despite this being "cheating," it is supported in Objective-C.\